<template>
	<view>
		<view class="top_nav">
			<view 
				:class="topNavActiveIndex==index?'top_nav_active':''" 
				v-for="(item,index) in topNavList" 
				:key='index' 
				@click="topNavCk(index)"
			>
				{{ item }}
			</view>	
		</view>
		<scroll-view 
			scroll-y="true" 
			:style="'height:'+height+'px'" 
			scroll-with-animation  
			@scrolltolower="LoadingMore" 
			v-if="orderList.length>0"
		>
			<view 
				class="group-order-content" 
				v-for="(item,index) in orderList" 
				:key='index'
			>
				<view class="group-order-title-state">
					<view class="group-order-title" v-if="item.activity_group_purchase!=0">拼团订单 下单：{{item.date_added}}</view>
					<view class="group-order-title" v-else>优惠订单 下单：{{item.date_added}}</view>
					<view class="group-order-hand" v-if="item.status == 1">拼团中</view>
					<view class="group-order-success" v-else-if="item.status == 2">已完成</view>
					<view class="group-order-refund" v-else>已退款</view>
				</view>
				<view class="">
					<view class="group-order-contain">
						<image :src="item.cours[0].activity_image" mode=""></image>
						<view class="group-order-contain-right">
							<view class="group-order-contain-title">
								{{item.cours[0].activity_course_title}} 
							</view>
							<view class="group-order-contain-condition">
								<view class="" v-if="item.status == 1 && item.activity_group_purchase !=0">
									还差<text>{{parseInt(item.activity_group_purchase) - parseInt(item.assemble_people)}}</text>人成团
								</view>
								<view v-else>
									备注:{{item.remark || "无"}}
								</view>
								<view class="">
									实际付费：<text>￥{{item.actual_total.substr(0,item.actual_total.length-3)}}.</text><text style="font-size: 28upx;">
									{{item.actual_total.substr(item.actual_total.length-2, item.actual_total.length)}}</text>
								</view>
							</view>
						</view>
					</view>
				</view>
				<!-- <view>{{item}}</view> -->
				<view class="group-order-operate" v-if="item.status == 1">
					<!-- #ifdef MP-WEIXIN -->
						<button class="group-order-operate-common invite-group" type="default" :id="index" style="padding: 0; color: #FF8B46;" open-type="share">邀请好友拼团</button>
					<!-- #endif -->
					<!-- #ifdef H5 -->
						<view class="group-order-operate-common invite-group" @click="getStore(item)">邀请好友拼团</view>
					<!-- #endif -->
					<view class="group-order-operate-common contect-teather" @click="gainTeacher(item.activity_id)">联系招生老师</view>
				</view>
				<view class="" v-else-if="item.status == 2">
					<view class="group-order-operate">
						<view class="group-order-operate-common electronic-receipt" @click="getReceipt(item)">电子收据</view>
						<!-- {{item}} -->
						<view class="group-order-operate-common contect-teather" @click="gainTeacher(item.activity_id)" style="margin-left: 450upx;">联系招生老师</view>
					</view>
					<view class="group-msg-content" v-for="(order_activity_course,ind) in item.cours" :key='ind'>
						<view class="group-msg-title">
							 <view>{{order_activity_course.activity_course_title}}</view>
							<view>×{{order_activity_course.quantity}}</view>
						</view>
						<view v-if="order_activity_course.order_custom_info.length==0">
							<!-- <view class="group-msg-operate">
								<view class="" @click="add_collectioncode(item.order_activity[0].store_id,item.order_activity[0].order_id)">修改孩子信息</view>
								<view class="" @click="contactCourse(order_activity_course.activity_course_id)">联系排课老师</view>
							</view> -->
							<view class="group-msg-operate">
								<view class="" @click="getActivityForMsg(item.activity_id,item.customer_telephone,item.order_id,order_activity_course.activity_course_id,order_activity_course.order_activity_course_id)">补充孩子信息</view>
								<view class="" @click="contactCourse(order_activity_course.activity_course_id)">联系排课老师</view>
							</view>
						</view>
						<!-- v-for="(order_custom_info,custom_index) in order_activity_course.order_custom_info " :key="custom_index"-->
						<view v-if="order_activity_course.order_custom_info.length != 0">
							<view class="group-msg-operate">
								<view v-if="order_activity_course.order_custom_info" class="" @click="getFormMsg(order_activity_course.order_custom_info)">修改孩子信息</view>
								<view class="" @click="contactCourse(order_activity_course.activity_course_id)">联系排课老师</view>
							</view>
						</view>
					</view>
				</view>
				<view class="" v-else>
					 <view class="group-order-operate" style="justify-content: space-between;">
						<view class="group-order-tip">拼团失败，请联系商家，协商确认</view>
						<view class="group-order-operate-common contect-teather" @click="gainTeacher(item.activity_id)">联系招生老师</view>
					</view>
				</view>
			</view>
		</scroll-view>
		<view class="no-order" v-else>
			暂无订单！请购买
		</view>
		<uni-popup ref="editStudentMsg" :custom="true">
			<view class="popup_box_de">
				<image class="popup_box_close" :src="imglink + 'home/pop_icon_failure.png'" @click="popupSwitch('edit')"></image>
				<view class="popup_box_content">
					<view class="popup_msg" v-for="(item,index) in formMsg" :key="index">
						<text>{{item.name}}</text>
						<input type="text" v-model="item.custom_field_value" :placeholder="item.placeholder"/>
					</view>
					<!-- <view class="popup_msg">
						<text>手机号</text>
						<input type="text" :value="student_telephone" placeholder="请输入手机号"/>
					</view>
					<view class="popup_msg">
						<text>孩子年龄</text>
						<input type="text" :value="student_age" placeholder="请输入孩子年龄"/>
					</view> -->
					<view class="edit_btn" @click="sureEdit">
						确认修改
					</view>
				</view>
			</view>
		</uni-popup>
		<uni-popup ref="addStudentMsg" :custom="true">
			<view class="popup_box_de">
				<image class="popup_box_close" :src="imglink + 'home/pop_icon_failure.png'" @click="closeAddPop()"></image>
				<view class="popup_box_content">
					<view class="popup_msg" v-for="item in formMsg" :key="index">
						<text>{{item.name}}</text>
						<input type="text" v-model="item.custom_field_value" :placeholder="item.placeholder"/>
					</view>
					<!-- <view class="popup_msg">
						<text>手机号</text>
						<input type="text" :value="student_telephone" placeholder="请输入手机号"/>
					</view>
					<view class="popup_msg">
						<text>孩子年龄</text>
						<input type="text" :value="student_age" placeholder="请输入孩子年龄"/>
					</view> -->
					<view class="edit_btn" @click="sureAdd()">
						确认添加
					</view>
				</view>
			</view>
		</uni-popup>
		<!-- 联系老师弹框 -->
		<uni-popup ref="contactPopup" :custom="true">
			<view class="popup_box_de" style="height: 996upx;" v-if="teacherWay!=null">
				<image class="popup_box_close" :src="imglink + 'home/popup-close.png'" @click="popupSwitch('contact')"></image>
				<view class="popup_box_content" style="top: 62upx;">
					<view class="teacher-code">
						<view class="teacher-code-title">
							<view class="pupop-line"></view>
							<view class="teacher-code-title-detail">联系老师</view>
							<view class="pupop-line"></view>
						</view>
						<view class="teacher-code-tip">有任何问题，请咨询老师</view>
						<view class="teacher-code-content" id="posterImg" v-if="teacherWay.wechat_qrcode !=''">
							<view class="teacher-code-content-tip" id="textBg">长按下面二维码，添加老师微信</view>
							<image :src="teacherWay.wechat_qrcode" mode="" id="qrCode" :show-menu-by-longpress="true"></image>
							<view class="teacher-code-add" id="text3">
								添加老师微信请备注<text>“活动报名”</text>
							</view>
						</view>
					</view>
					<view class="teacher-phone" style="padding: 0 30upx;box-sizing: border-box;">
						<view class="teacher-phone-title">
							<text>老师联系电话</text>
							<view class="" @click="callPhone">
								<image :src="imglink + 'home/phone-icon.png'" mode=""></image>
								<text>拔打电话</text>
							</view>
						</view>
						<view class="teacher-phone-content">
							{{teacherWay.changePhone}}
						</view>
						<view class="" style="color: #999999;text-align: center;font-size: 24upx;margin-top: 10upx;">
							电话接通，请告知“活动报名"
						</view>
					</view>
				</view>
			</view>
		</uni-popup>
		<!-- 分享提示 -->
		<uni-popup ref="shareTip" :custom="true">
			<view class="popup_box_de_share">
				<image class="popup_box_close_share" :src="imglink + 'share_tip.png'"></image>
			</view>
		</uni-popup>
	</view>
</template>

<script>
	import uniPopup from '@/components/uni-popup/uni-popup.vue'
	//#ifdef H5
	import wx from '@/common/wx-js-sdk.js'
	//#endif
	
	export default{
		components:{uniPopup},
		data(){
			return{
				imglink: this.$store.state.imgLink,
				topNavList: ['进行中','完成订单','拼团失败'],
				topNavActiveIndex:0,
				page:1,
				pagesize:8,
				lastPage:'',
				height:0,
				orderList: [],
				status:1,
				student_name:'',
				student_telephone:'',
				student_age:"",
				store_id:"",
				teacherWay:'',
				formMsg:[],
				activity_course_id:"",
				edit_order_id:'',
				addParams : {
					token:null,
					activity_id:null,
					order_id:null,
					customer_telephone:null,
					course:null,
					activity_course_id:null,
					order_activity_course_id:null
				},
				formMsgStr:'',
				store_info:'',
				store:{
					activity_id:'',
					buy_method:'',
					order_id:'',
					activity_course_title:'',
					img:'',
				}
			}
		},
		onLoad(option) {
			if(!this.$store.getters.getToken&&!option.token){
				location.href = this.$store.state.URL + "/customer/user/wx_login?page=/pages/memberCenter/orderManage/orderManage?state=1&store_id="+option.store_id
			}
			let token = option.token;
			if(!token){
				token = uni.getStorageSync('token')
			}else{
				uni.setStorageSync('token', token);
			}
			this.$store.commit('updateToken',token)
			console.log(uni.getStorageSync('token'))
			console.log(this.$store.getters.getToken)
			let store_id = parseInt(option.store_id,10);
			console.log('进入了onload 获取url的store_id',store_id)
			if(!store_id > 0){
				store_id = uni.getStorageSync('store_id')?parseInt(uni.getStorageSync('store_id'),10):0
			}else{
				uni.setStorageSync('store_id', store_id)
			}
			
			this.store_id = parseInt(store_id,10)
			this.$store.commit('updateStoreId',store_id)
			this.height = parseInt(uni.getSystemInfoSync().windowHeight) - this.height
			this.topNavActiveIndex = parseInt(option.state)
			switch (this.topNavActiveIndex){
				case 0: this.status = 1; break;
				case 1: this.status = 2; break;
				case 2: this.status = 0; break; 
			}
			this.getOrderList()
			this.getStoreInfo()
		},
		onShow() {
		},
		onShareAppMessage(res) {
			let _self = this
			_self.orderList.forEach((item) => {
				if( item.order_id == _self.orderList[res.target.id].order_id ){
					_self.store.activity_id = item.activity_id
					_self.store.buy_method = item.buy_method
					_self.store.order_id = item.order_id
					_self.store.activity_course_title = item.cours[0].activity_course_title
					_self.store.img = item.cours[0].activity_image
				}
			})
			return {
				title:  _self.store_info.nickname + '邀请您参与' + _self.store.activity_course_title + '活动拼团', // 分享描述
				path: '/pages/home/organization/activeDetail-Group-3?store_id='+_self.store_id + 
				  '&actId=' + _self.store.activity_id + '&customer_id=' + _self.store_info.customer_id + 
				  '&order_id=' + _self.store.order_id + '&page=share&buy_method=' + _self.store.buy_method,
				imageUrl: _self.store.img,
			}
		},
		methods:{
			sureEdit(){
				let data = {
					token:this.$store.getters.getToken,
					formMsg:JSON.stringify(this.formMsg)
				}
				this.$api.order_course_child_msg_edit(data).then(res => {
					console.log(res)
					if(res.status){
						uni.showToast({
							title:'修改成功',
							icon:'none',
							duration:2000
						})
						setTimeout(()=> {
							this.$refs.editStudentMsg.close()
							this.getOrderList()
						},1000)
					}else{
						uni.showToast({
							title:res.msg,
							icon:'none',
							duration:2000
						})
					}
				}).catch(er => {
					console.log(er)
				})
			},
			contactCourse(courseid){
				console.log(courseid)
				let data = {
					token:this.$store.getters.getToken,
					course_id:courseid
				}
				this.$api.course_store_contact(data).then(res => {
					console.log(res)
					if(res.status){
						this.teacherWay = res.res.info
						this.teacherWay.changePhone = this.teacherWay.telephone.replace(/(^\d{3}|\d{4}\B)/g,"$1-")
						this.$refs.contactPopup.open()
					}else{
						uni.showToast({
							title:res.msg,
							icon:'none',
							duration:2000
						})
					}
				}).catch(err => {
					console.log(err)
				})
			},
			// 电子收据
			getReceipt(item){
				console.log("setReceipt",this.$store.getters.getToken)
				let data = {
					token:this.$store.getters.getToken,
					order_id:item.order_id,
					nickname: item.username,
					phone: item.customer_telephone,
					activity_detail: item.cours[0].remark||'无',
					teach_name:item.teacher_name,
					// remark:,
				}
				console.log(item,"==========================");
				// 3.发送请求
				this.$api.set_receipt(data).then(res => {
					console.log(res)
					if(res.status){
						uni.navigateTo({
							url:"/pages/memberCenter/orderManage/receiptForCollection?topNavActiveIndex=0&order_id=" + item.order_id
						})
					}else{
						uni.navigateTo({
							url:"/pages/memberCenter/orderManage/receiptForCollection?topNavActiveIndex=0&order_id=" + item.order_id
						})
					}
				}).catch(err => {
					console.log(err)
				})
			},
			getStoreInfo(){
				const _self = this
				const data = {
					customer_store_id:this.store_id
				}
				this.$api.getCustomerInfo(data).then(res => {
					this.store_info = res.data.userinfo
				}).catch( err => {
					console.log(err)
				})
			},
			getStore(item){
				console.log(item,'IIIIIIIIIIIIIIIIIIIIIIIIIIIIIIII');
				const _self = this
				
				const data = {
					customer_store_id:this.store_id
				}
				
				this.$api.getCustomerInfo(data).then(res => {
					
					if(!res.status){
						return false
					}
					// console.log(res.data,'store res.data')
					// return false
					
					const store_info = res.data.userinfo
					// 进行签名的时候  Android 不用使用之前的链接， ios 需要
					let signLink = /(Android)/i.test(navigator.userAgent) ? location.href : window.entryUrl;
					let data = {
						token:_self.$store.getters.getToken,
						url:signLink
					}
					
					this.$api.gain_share_data(data).then( res => {
						const shareConfig = JSON.parse(res.data)
						_self.$refs.shareTip.open()
						console.log(shareConfig,'share res.data')
						
						wx.config(shareConfig)
						wx.ready(function(){
							
							wx.checkJsApi({
								jsApiList: [
									'updateTimelineShareData',
									'updateAppMessageShareData',
									'onMenuShareAppMessage',
									'onMenuShareTimeline'
								],
								success: function(res) {
									console.log('接口检测成功:'+res);
								},
								error: function(err) {
									console.log('接口检测失败:'+err);
								}
							})
							console.log(item)
							const shareData = { 
								title: item.cours[0].activity_course_title, // 分享标题
								desc:  store_info.nickname + '邀请您参与' + item.cours[0].activity_course_title + '活动拼团', // 分享描述
								link: _self.current_url()+'/pages/home/organization/activeDetail-3?store_id='+_self.store_id + '&actId=' + item.activity_id + '&customer_id=' + store_info.customer_id + '&order_id=' + item.order_id + '&page=share&buy_method=' + item.buy_method,
								imgUrl: item.cours[0].activity_image, // 分享图标
								success: function (res) {
								  console.log(res,'success ---')
								},
								fail:function(err){
									console.log(err.errMsg,'fail ---')
								}
							}
							wx.updateAppMessageShareData(shareData);
							wx.updateTimelineShareData(shareData);
						})
						wx.error(function(res){
							console.log(res,'wx.error')
						})					
					}).catch( err => {
						
						console.log(err)
					})
					
				}).catch( err => {
					console.log(err)
				})
				
				
			},
			
			getFormMsg(order_custom_info){
				console.log("getFormMsg(order_custom_info)",order_custom_info)
				let ids=[]
				order_custom_info.forEach((info,index)=>{
					ids.push(info.order_custom_info_id)
				})
				console.log(ids,"？？？？？？？？？？？？？？？？？？？");
				let data = {
					token:this.$store.getters.getToken,
					ids:JSON.stringify(ids),
				}
				let that = this
				this.$api.gain_course_form_msg(data).then(res => {
					console.log(res)
					if(res.status){
						this.formMsg = res.res
						this.formMsg.forEach(item => {
							item.placeholder = '请输入' + item.name
						})
						this.$refs.editStudentMsg.open()
					}else{
						uni.showToast({
							title:res.msg,
							icon:'none',
							duration:2000
						})
					}
				}).catch(err => {
					console.log(err)
				})
			},
			add_collectioncode(store_id,order_id){
				uni.redirectTo({
					url:'/pages/memberCenter/collectioncode/collectioncode/registration?store_id='+store_id+'&order_id='+order_id
				})
			},
			popupSwitch(flag){
				if(flag == 'edit'){
					this.$refs.editStudentMsg.close()
				}else{
					this.$refs.contactPopup.close()
				}
			},
			topNavCk(index) {
				this.topNavActiveIndex = index
				console.log(typeof(this.topNavActiveIndex))
				// 1.转换status，0拼团失败， 1拼团进行中， 2拼团失败
				switch (this.topNavActiveIndex){
					case 0: this.status = 1; break;
					case 1: this.status = 2; break;
					case 2: this.status = 0; break; 
				}
				this.getOrderList()
			},
			callPhone(){
				uni.makePhoneCall({
					phoneNumber:this.teacherWay.telephone,
					success(res) {
						console.log(res)
					},
					fail(err) {
						console.log(err)
					}
				})
			},
			// 获取老师联系方式
			gainTeacher(id){
				let data = {
					token:this.$store.getters.getToken,
					activity_id:id,
				}
				console.log(data,"454545454545");
				this.$api.gain_teacher_contact(data).then(res => {
					console.log(res)
					if(res.status){
						this.teacherWay = res.data
						console.log(this.teacherWay,"454545454545");
						this.teacherWay.changePhone = this.teacherWay.telephone.replace(/(^\d{3}|\d{4}\B)/g,"$1-")
						this.$refs.contactPopup.open()
					}
				}).catch(err => {
					console.log(err)
				})
			},
			// 获取订单数据
			getOrderList(){
				console.log("getOrderList",this.$store.getters.getToken)
				// 加载更多修改了page,这里需要将page重新设置成1
				let data = {
					customer_id:uni.getStorageSync('userInfo').customer_id,
					store_id:this.store_id,
					status: this.status,
					page: 1,
					pagesize: this.pagesize,
				}
				// 3.发送请求
				this.$api.get_customer_order_list(data).then(res => {
					if(res.status){
						this.orderList = res.list.data
						this.lastPage = res.list.last_page
						console.log(this.orderList,'订单列表')
					}else{
						uni.showToast({
							title:res.msg,
							icon:'none',
							duration:2000
						})
					}
				}).catch(err =>{
					console.log(err)
				})
			},
			
			// 上拉加载更多
			LoadingMore(){
				this.page ++
				console.log(this.page)
				if(this.page <= this.lastPage){
					let data = {
						customer_id:uni.getStorageSync('customer_id'),
						status: this.status,
						page: this.page,
						pagesize: this.pagesize
					}
					this.$api.get_customer_order_list(data).then(res=>{
						this.orderList = this.orderList.concat(res.list.data)
						console.log("上拉加载更多的数据.....")
						console.log(this.orderList)
					}).catch(err => {
						console.log(err)
					})
				}else{
					uni.showToast({
						title:'没有更多了',
						icon:'none',
						duration:2000
					})
				}
			},
			
			// 获取活动表单信息
			getActivityForMsg(activity_id,customer_telephone,order_id,activity_course_id,order_activity_course_id){
				// 保存表单提交参数
				this.addParams.token = this.$store.getters.getToken
				this.addParams.activity_id = activity_id
				this.addParams.customer_telephone = customer_telephone
				this.addParams.order_activity_course_id = order_activity_course_id
				this.addParams.activity_course_id = activity_course_id
				this.addParams.order_id = order_id
				
				console.log(this.addParams,'AAAAAAAAAAAAAAAAAAA');
				let params = {
					token:this.$store.getters.getToken,
					activity_id:activity_id
				}
				this.$api.together_order_msg(params).then(res =>{
					if(res.status){
						this.formMsg = []
						let data = res.res
						data.forEach(item => {
							let params  = {
								custom_field_id:item.name.field_id,
								value:'',
								name:{
									field_id:item.name.field_id,
									name:item.name.name,
									require:item.name.require,
									statue:item.name.status
								},
								placeholder:'请输入'+item.name.name
							}
							this.formMsg.push(params)
						})
						console.log(this.formMsg ,"FFFFFFFFFFMMMMMMMMMMMMMMMM");
						this.$refs.addStudentMsg.open()
					}
				})
			},
			sureAdd(){

				// this.addParams.course.forms = [{
				// 	form_field:this.formMsg
				// }]
				this.addParams.course = [{
					activity_id:this.addParams.activity_id,
					activity_course_id:this.addParams.activity_course_id,
					order_activity_course_id:this.addParams.order_activity_course_id,
					forms:[{
						chooseAddreId:0,
						form_field:this.formMsg
					}]
				}]
				console.log(this.addParams,'AAAAAAAAPPPPPPPPPP');
				this.addParams.course = JSON.stringify(this.addParams.course)
				// let params = {
				// 	token:this.$store.getters.getToken,
				// 	activity_id:activity_id,
				// 	order_id:order_id,
				// 	activity_course_id:activity_course_id,
				// 	order_activity_course_id:order_activity_course_id,
				// 	forms:
				// }
				this.$api.course_user_msg(this.addParams).then(res => {
					if(res.status){
						this.closeAddPop()
						this.getOrderList()
						uni.showToast({
							icon:'none',
							title:'添加成功'
						})
					}else{
						this.closeAddPop()
						this.getOrderList()
						uni.showToast({
							icon:'none',
							title:res.msg
						})
					}
				})
			},
			closeAddPop(){
				this.$refs.addStudentMsg.close()
			}
			
		}
	}
</script>

<style>
	.popup_box_de_share{
		width: 100%;
		height: 100%;
	}
	.popup_box_close_share{
		width: 300upx;
		height: 300upx;
		position: fixed;
		top: 10upx;right: 10upx;
	}
	.teacher-phone-content{
		width: 100%;
		height: 64upx;
		line-height: 64upx;
		background: #F3F3F4;
		margin-top: 20upx;
		text-align: center;
	}
	.teacher-phone-title{
		width: 100%;
		display: flex;
		padding-left: 74upx;
		box-sizing: border-box;
		margin-top: 10upx;
	}
	.teacher-phone-title>text{
		color: #333333;
		font-size: 28upx;
	}
	.teacher-phone-title>view{
		width: 164upx;
		height: 40upx;
		background: linear-gradient(to right,#FE9543,#FF664F);
		box-shadow: 0 4upx 8upx 0 rgba(255, 105, 78, 0.3);
		border-radius: 4upx;
		text-align: center;
		line-height: 40upx;
		margin-left: 20upx;
	}
	.teacher-phone-title>view>image{
		width: 20upx;
		height: 20upx;
	}
	.teacher-phone-title>view>text{
		color: #FFFFFF;
		font-size: 24upx;
	}
	.teacher-code-add{
		color: #666666;
		font-size: 26upx;
		text-align: center;
	}
	.teacher-code-add>text{
		color: #FF391F;
	}
	.teacher-code-content>image{
		width: 324upx;
		height: 322upx;
		margin: 12upx auto;
		margin-left: 40upx;
	}
	.teacher-code-content-tip{
		color: #999999;
		font-size: 24upx;
		text-align: center;
	}
	.teacher-code-tip{
		text-align: center;
		color: #FFFFFF;
		font-size: 24upx;
		margin-top: 10upx;
	}
	.teacher-code{
		width: 100%;
		/* height: 686upx; */
		background: linear-gradient(#FE9543,#FF664F);
		padding: 0 30upx;
		padding-bottom: 20upx;
		box-sizing: border-box;
	}
	.teacher-code-content{
		width: 100%;
		padding: 30upx;
		box-sizing: border-box;
		background: #FFFFFF;
		border-radius: 20upx;
		margin-top: 30upx;
	}
	.pupop-line{
		width: 84upx;
		height: 2upx;
		border-top: 2upx solid rgba(255,255,255,0.6);
		margin-top: 64upx;
	}
	.pupop-line:nth-child(1){
		margin-left: 84upx;
	}
	.teacher-code-title{
		display: flex;
	}
	.teacher-code-title-detail{
		color: #FFFFFF;
		font-size: 34upx;
		margin: 0 30upx;
		margin-top: 40upx;
	}
	.popup_box_de{
		height: 924upx;
		width: 590upx;
		position: relative;
	}
	.popup_box_close{
		width: 52upx;
		height: 52upx;
		position: absolute;
		top: 0;
		right: 0;
	}
	.popup_box_content{
		width: 100%;
		/* height: 662upx; */
		background: #FFFFFF;
		position: absolute;
		top: 72upx;left: 0;
		border-radius: 16upx;
		z-index: 999;
		padding: 0 30upx;
		padding-top: 20upx;
		padding-bottom: 30upx;
		box-sizing: border-box;
	}
	.popup_msg{
		width: 100%;
		display: flex;
		height: 80upx;
		background: #F5F5F5;
		border-radius: 4upx;
		margin-bottom: 30upx;
	}
	.popup_msg>text{
		text-align: center;
		display: inline-block;
		width: 30%;
		line-height: 80upx;
		background: #ECECEC;
		font-size: 28upx;
		color: #333;
	}
	.popup_msg>input{
		padding:0 20upx;
		height: 80upx;
		box-sizing: border-box;
		font-size: 28upx;
	}
	.edit_btn{
		width: 500upx;
		height: 100upx;
		border-radius: 44upx;
		background: linear-gradient(to right,#FE9543,#FF664F);
		box-shadow: 0 8upx 16upx 0 rgba(166, 13, 0, 0.23);
		 text-align: center;
		 color: #FFFFFF;
		 font-size: 32upx;
		 line-height: 100upx;
		 margin: 0 auto;
		 margin-top: 80upx;
	}
	.no-order{
		color: #999999;
		font-size: 28upx;
		position: fixed;
		top: 50%;left: 50%;
		transform: translate(-50%,-50%);
	}
	page{
		background: #F3F3F4;
	}
	.top_nav{
		width: 100%;
		height: 88upx;
		line-height: 88upx;
		background-color: #fff;
		margin-bottom: 10upx;
		box-sizing: border-box;
		color:#666666;
		display: flex;
		padding: 0upx 110upx;
		justify-content: space-between;
		font-size: 30upx;
	}
	.top_nav>view{
		width: 160upx;
		text-align: center;
	}
	.top_nav_active {
		color: #FF8B46;
		position: relative;
	}
	.top_nav_active::after {
		position: absolute;
		content: '';
		width: 72upx;
		height: 6upx;
		background-color: #FF8B46;
		border-radius: 3upx;
		bottom: 0upx;
		left: 50%;
		transform: translate(-50%,0);
	}
	.group-order-content{
		width: 100%;
		padding: 0 30upx;
		padding-bottom: 18upx;
		box-sizing: border-box;
		background: #FFFFFF;
		margin-bottom: 20upx;
	}
	.group-order-title-state{
		width: 100%;
		padding: 20upx 0;
		box-sizing: border-box;
		border-bottom: 1upx solid #DEDEDE;
		display: flex;
		justify-content: space-between;
		font-size: 28upx;
	}
	.group-order-title{
		font-size: 28upx;
		font-weight: 600;
		color: #333333;
	}
	.group-order-hand{
		color: #FF8B46;
	}
	.group-order-success,.group-order-refund{
		color: #999999;
	}
	.group-order-refund-not{
		color: #FF391F;
	}
	.group-order-contain{
		width: 100%;
		padding: 20upx 0;
		box-sizing: border-box;
		border-bottom: 1upx solid #DEDEDE;
		display: flex;
		justify-content: space-between;
	}
	.group-order-contain>image{
		width: 160upx;
		height: 120upx;
		flex: 1;
	}
	.group-order-contain-right{
		margin-left: 20upx;
		flex: 4;
		display: flex;
		flex-direction: column;
	}
	.group-order-contain-title{
		color: #333333;
		font-size: 24upx;
	}
	.group-order-contain-condition{
		margin-top: 40upx;
		display: flex;
		justify-content: space-between;
		vertical-align: auto;
	}
	.group-order-contain-condition>view:first-child{
		color: #999999;
		font-size: 24upx;
		flex: 1;
		text-align: left;
		padding-top: 7upx;
	}
	.group-order-contain-condition>view:last-child{
		color: #999999;
		font-size: 24upx;
		flex: 1;
		text-align: right;
	}
	.group-order-pay{
		text-align: right;
		color: #999999;
		font-size: 24upx;
		margin-top: 10upx;
	}
	.group-order-contain-condition>view:first-child>text{
		color: #FF391F;
	}
	.group-order-contain-condition>view:last-child>text,.group-order-pay>text{
		color: #FF391F;
		font-size: 32upx;
	}
	.group-order-operate{
		display: flex;
		padding-top: 16upx;
		box-sizing: border-box;
	}
	.group-order-operate-common{
		width: 236upx;
		height: 60upx;
		line-height: 60upx;
		font-size: 28upx;
		border-radius: 35upx;
		text-align: center;
	}
	.invite-group{
		border: 1upx solid #FF8B46;
		color: #FF8B46;
		margin-left: 212upx;
	}
	.contect-teather{
		color: #FFFFFF;
		background: linear-gradient(to right,#FE9543,#FF664F);
		box-shadow: 0 4upx 12upx 0 rgba(255, 111, 95, 0.18);
		margin-left: 30upx;
	}
		.electronic-receipt{
			border: 1upx solid #FF8B46;
			color: #FF8B46;
		}
		.contect-teather{
			position: absolute;
			right: 30upx;
			color: #FFFFFF;
			background: linear-gradient(to right,#FE9543,#FF664F);
			box-shadow: 0 4upx 12upx 0 rgba(255, 111, 95, 0.18);
			margin-left: 30upx;
		}
	.group-msg-content{
		width: 100%;
		background: #F4F5F9;
		padding: 20upx 20upx 30upx;
		box-sizing: border-box;
		margin-top: 20upx;
	}
	.group-msg-title{
		display: flex;
		justify-content: space-between;
	}
	.group-msg-title>view:first-child{
		width: 510upx;
		color: #666666;
		font-size: 24upx;
	}
	.group-msg-title>view:last-child{
		color: #999999;
		font-size: 28upx;
		margin-top: 18upx;
	}
	.group-msg-operate{
		display: flex;
		justify-content: space-between;
		margin-top: 30upx;
	}
	.group-msg-operate>view{
		width: 45%;
		text-align: center;
		border-radius: 4upx;
		background: #FFFFFF;
		line-height: 48upx;
		height: 48upx;
		color: #FF8B46;
		font-size: 24upx;
	}
	.group-order-tip{
		color: #999999;
		font-size: 24upx;
		line-height: 60upx;
	}
	
</style>
